cmake_minimum_required(VERSION 3.24)

project(mygemm LANGUAGES CXX CUDA)

# set
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
file(GLOB DLL_FILES ${PROJECT_SOURCE_DIR}/third_party/clblas/bin/*.dll)
file(COPY ${DLL_FILES} DESTINATION ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}/Debug)

# src
file(GLOB SRC_FILES ${PROJECT_SOURCE_DIR}/src/*.cpp ${PROJECT_SOURCE_DIR}/src/*.cu)
add_executable(mygemm ${SRC_FILES})

# inc
target_include_directories(mygemm PUBLIC    ${PROJECT_SOURCE_DIR}/src 
${PROJECT_SOURCE_DIR}/third_party/clblas/include)

# lib
target_link_directories(mygemm PUBLIC   ${PROJECT_SOURCE_DIR}/third_party/clblas/lib64/import)
target_link_libraries(mygemm OpenCL cuBLAS clBLAS)